"""
给飞秋发送消息
"""
from socket import *

# ip = "10.0.151.228"
# ip = "192.168.0.103"
ip = "0.0.0.0"
port = 2425  # 飞秋的端口号
address = (ip, port)
udp_send_socket = socket(AF_INET, SOCK_DGRAM)

"""
飞秋接收数据的格式：
# 版本:发送时间:用户名:主机名:发送内容
# 1:123443444:user:machine:32:hello
"""
data = "1:37474858585" + ":王二狗:wangergou-pc:32:姑娘漂亮啊。。"

udp_send_socket.sendto(data.encode("gbk"),address)
udp_send_socket.close()